<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: pink;

            /* 1.设置文本不允许换行 */
            white-space: nowrap;
            /* 2.设置盒子内容溢出隐藏 */
            overflow: hidden;
            /* 3.设置溢出隐藏文字 */
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div class="box">
        欢迎来到黑马程序员武汉校区武汉大前端70期教室206爱你么么哒
    </div>
</body>
</html>